/**********************************************************************************
// DemoWinGame
//
// Creation:	19 May 2007
// Updated:		03 May 2011
// Compiler:	Visual Studio 2010
//
// Notes:	    A windows game is a subclass of the WindowsGame class.
//              The game must override the methods GameInit, GameLogic, 
//				GameDraw and GameShutdown of WindowsGame. 
//
**********************************************************************************/

#include "WindowsGame.h"

/*************************************************************/


class WinGame : public WindowsGame
{
private:
	char text[80];

public:
	void GameInit();
	void GameLogic();
	void GameDraw();
};

/**********************************************************************************/

void WinGame::GameInit() {}

/**********************************************************************************/

void WinGame::GameLogic()
{
	EndsOnEscape();
} 

/**********************************************************************************/

void WinGame::GameDraw()
{
	sprintf_s(text, "Windows Game Demo");
	Text(text, 10, 10, RGB(0,0,0));
} 


/**********************************************************************************/
/*                                  WinMain                                       */
/**********************************************************************************/

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	WinGame demo;
	demo.SetWindowMode(WINDOWED);
	demo.SetWindowSize(800,600);
	demo.SetWindowBgColor(240,240,140);	
	demo.SetWindowTitle(string("WinGame Demo"));
	demo.Initialize(hInstance);
	demo.Start();

	return 0;
}

/*************************************************************/

